<template>
  <!-- 我的订单 -->
  <div>
    <!-- name: 标签名称，作为匹配的标识符 -->
    <van-tabs v-model:active="active">
      <van-tab title="全部">
        <order_show></order_show>
      </van-tab>
      <van-tab title="已支付">
        <order_pay></order_pay>
      </van-tab>
      <van-tab title="未支付">
        <order_not></order_not>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import order_show from "./order_show.vue";
import order_not from "./order_not.vue";
import order_pay from "./order_pay.vue";
export default {
  components: {
    order_show,
    order_not,
    order_pay,
  },
  data() {
    return {
      active: 0,
    };
  },

  mounted() {},
  methods: {
    // 取消未支付的订单
    del: function (id) {
      this.myaxios(this.weburl + "user/collect/" + id, "delete", {
        user_id: this.user_id,
      }).then((data) => {
        console.log(data);
        if (data.code == 200) {
          this.$toast.success(data.msg);
          this.submit();
        } else {
          this.$toast.fail(data.msg);
        }
      });
    },
  },
  created() {},
};
</script>

<style scoped>
</style>